import React, { Component } from 'react';
import {
  Text,
  View,
  Image,
  StyleSheet,
} from 'react-native';
import Carousel from 'react-native-looped-carousel';

export default class CarouselExample extends Component {

  constructor(props) {
    super(props);
  }

  render() {
    return (
        <Carousel
          delay={2000}
          style={styles.imageScreen}
          autoplay
          bullets={true}
          bulletStyle={{top: 8}}
          chosenBulletStyle={{top: 8}}
        >
          <Image 
            resizeMode="stretch" 
            source={require("./../images/health.jpg")}
            style={styles.imagePage} 
          />
          <Image 
            resizeMode="stretch" 
            source={require("./../images/lightOne.jpg")}
            style={styles.imagePage} 
          />
          <Image 
            resizeMode="stretch" 
            source={require("./../images/lightTwo.jpg")} 
            style={styles.imagePage} 
          />
        </Carousel>
    );
  }
}

const styles = StyleSheet.create({
  imageScreen: {
    width: gScreen.width,
    height: gScreen.width/2,
  },
  imagePage: {
    width: gScreen.width,
    height: gScreen.width/2,

  }
})